<?php
namespace Adminx\Controller;

class FinanceController extends AdminController {

	#列表
	public function index() {

		$username = I('username');
		$type  = I('type');

		if($type!='' && $type>0){
			$map['type'] = $type;
		}

		if($username!=''){
			$map['username'] = $username;
		}		

		$obj = M('Finance');
		$count = $obj->where($map)->count();
		import("Common.ORG.Page");
		$page = new \Page($count, 15);
		$show = $page->show();
		$list = $obj->where($map)->order('id desc')->limit($page->firstRow . ',' . $page->listRows)->select();
		$this->assign('list', $list);
		$this->assign('page', $show);
		$this->assign('type', $type);
		$this->assign('username', $username);
		$this->assign('cate',C('moneyType'));
		$this->display();
	}	
}
?>